/*****************************************************************************
  Copyright ?2002-2004 by Martin Cook. All rights are reserved. If you like
  this code then feel free to go ahead and use it. The only thing I ask is 
  that you don't remove or alter my copyright notice. Your use of this 
  software is entirely at your own risk. I make no claims about the 
  reliability or fitness of this code for any particular purpose. If you 
  make changes or additions to this code then please clearly mark your code 
  as yours. If you have questions or comments then please contact me at: 
  martin@codegator.com
  
  Have Fun! :o)
*****************************************************************************/


using System;
using System.Data;

namespace CG.Security.Data
{

	/// <summary>
	/// Data access operations for rights.
	/// </summary>
	public interface IRightData
	{
		
		/// <summary>
		/// Creates a new system-level right.
		/// </summary>
		/// <param name="rightName">The name of the right (must be unique).</param>
		/// <param name="rightDescription">The description of the right (optional).</param>
		/// <returns>The identifier for the new right.</returns>
		int Create(
			string rightName,
			string rightDescription
			);

		// ******************************************************************

		/// <summary>
		/// Deletes the specified system-level right.
		/// </summary>
		/// <param name="rightID">The identifier for the right.</param>
		void Delete(
			int rightID
			);

		// ******************************************************************

		/// <summary>
		/// Updates the specified system-level right.
		/// </summary>
		/// <param name="rightID">The identifier for the right.</param>
		/// <param name="rightName">The new name for the right (must be unique).</param>
		/// <param name="rightDescription">The new description for the right (optional).</param>
		void Update(
			int rightID,
			string rightName,
			string rightDescription
			);

		// ******************************************************************

		/// <summary>
		/// Returns all the system-level rights in the database.
		/// </summary>
		/// <returns>A DataSet containing all the rights in the database.</returns>
		System.Data.DataSet FindAll();

		// ******************************************************************

		/// <summary>
		/// Returns the properties for the specified system-level right.
		/// </summary>
		/// <param name="rightID">The identifier for the right.</param>
		/// <returns>A DataReader containing the properties for the specified right.</returns>
		System.Data.IDataReader FindByPK(
			int rightID
			);

	} // End IRightData

} // End namespace CG.Security.Data

